import App from './App'
import store from './store'
import MinCache from './common/utils/MinCache.js'
import configService from './common/service/config.service.js' //环境配置，生产或者开发。。
// import router from './common/router'

import { http } from '@/common/service/service.js' 

//路由管理 import {RouterMount} from './plugin/uni-simple-router/index.js'
 
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
Vue.prototype.$store = store
// Vue.prototype.$adpid = "1111111111"
// 注册缓存器
Vue.use(MinCache,{timeout: 6})
// config
Vue.prototype.$config=configService;
// request请求
Vue.prototype.$http = http

Vue.prototype.$backgroundAudioData = {
	playing: false,
	playTime: 0,
	formatedPlayTime: '00:00:00'
}
App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	app.use(store)
	app.config.globalProperties.$adpid = "1111111111"
	app.config.globalProperties.$backgroundAudioData = {
		playing: false,
		playTime: 0,
		formatedPlayTime: '00:00:00'
	}
	return {
		app
	}
}
// #endif
